{extend name="Index/index" /}
{block name="table"}    
		<div class="page-content-wrapper" >
		<div class="page-content" style=" min-height: 700px;">
			<!-- BEGIN SAMPLE PORTLET CONFIGURATION MODAL FORM-->
			<div class="modal fade" id="portlet-config" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
				<div class="modal-dialog">
					<div class="modal-content">
						<div class="modal-header">
							<button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
							<h4 class="modal-title">Modal title</h4>
						</div>
						<div class="modal-body">
							 Widget settings form goes here
						</div>
						<div class="modal-footer">
							<button type="button" class="btn blue">Save changes</button>
							<button type="button" class="btn default" data-dismiss="modal">Close</button>
						</div>
					</div>
					<!-- /.modal-content -->
				</div>
				<!-- /.modal-dialog -->
			</div>
			<!-- /.modal -->
			<!-- END SAMPLE PORTLET CONFIGURATION MODAL FORM-->
			<!-- BEGIN STYLE CUSTOMIZER -->
			<div class="theme-panel hidden-xs hidden-sm">
				
				<div class="toggler-close">
				</div>
				<div class="theme-options">
					<div class="theme-option theme-colors clearfix">
						<span>
							 THEME COLOR
						</span>
						<ul>
							<li class="color-black current color-default" data-style="default">
							</li>
							<li class="color-blue" data-style="blue">
							</li>
							<li class="color-brown" data-style="brown">
							</li>
							<li class="color-purple" data-style="purple">
							</li>
							<li class="color-grey" data-style="grey">
							</li>
							<li class="color-white color-light" data-style="light">
							</li>
						</ul>
					</div>
					<div class="theme-option">
						<span>
							 Layout
						</span>
						<select class="layout-option form-control input-small">
							<option value="fluid" selected="selected">Fluid</option>
							<option value="boxed">Boxed</option>
						</select>
					</div>
					<div class="theme-option">
						<span>
							 Header
						</span>
						<select class="header-option form-control input-small">
							<option value="fixed" selected="selected">Fixed</option>
							<option value="default">Default</option>
						</select>
					</div>
					<div class="theme-option">
						<span>
							 Sidebar
						</span>
						<select class="sidebar-option form-control input-small">
							<option value="fixed">Fixed</option>
							<option value="default" selected="selected">Default</option>
						</select>
					</div>
					<div class="theme-option">
						<span>
							 Sidebar Position
						</span>
						<select class="sidebar-pos-option form-control input-small">
							<option value="left" selected="selected">Left</option>
							<option value="right">Right</option>
						</select>
					</div>
					<div class="theme-option">
						<span>
							 Footer
						</span>
						<select class="footer-option form-control input-small">
							<option value="fixed">Fixed</option>
							<option value="default" selected="selected">Default</option>
						</select>
					</div>
				</div>
			</div>
			<!-- END STYLE CUSTOMIZER -->
			<!-- BEGIN PAGE HEADER-->
			<div class="row">
				<div class="col-md-12">
					<!-- BEGIN PAGE TITLE & BREADCRUMB-->
					<h3 class="page-title">
					我的收藏
					</h3>
					<ul class="page-breadcrumb breadcrumb">
						
						<li>
							<i class="fa fa-home"></i>
							<a href="index.html">
								Home
							</a>
							<i class="fa fa-angle-right"></i>
						</li>
						<li>
							<a href="{url:(index/Collect/index)}">
								我的收藏
							</a>
							<i class="fa fa-angle-right"></i>
						</li>
						
					</ul>
					<!-- END PAGE TITLE & BREADCRUMB-->
				</div>
			</div>
			<!-- END PAGE HEADER-->
			<!-- BEGIN PAGE CONTENT-->
			<div class="row">
				<div class="col-md-12">
					<!-- BEGIN SAMPLE TABLE PORTLET-->
							
							<div class="tools">
								<a href="javascript:;" class="collapse">
								</a>
								<a href="#portlet-config" data-toggle="modal" class="config">
								</a>
								<a href="javascript:;" class="reload">
								</a>
								<a href="javascript:;" class="remove">
								</a>
							</div>
						<div class="portlet-body">
							<div class="table-responsive">
								<table class="table table-striped table-bordered table-hover" id="datatable_products">
								<thead>
								<tr  role="row" class="heading">
									<th width="1%">
										#
									</th>
									<th width="30%">
										标题
									</th>
									<th width="20%">
										大小
									</th>
									<th width="15%">
										收藏时间
									</th>
									<th width="15%">
										操作
									</th>
								</tr>
								</thead>
									<tbody>
								{if empty($record)}
								<tr>
									<td colspan="5" style="text-align: center;">暂无收藏的档案</td>
								</tr>
								{else/}
									{foreach $record as $vo}
									<tr>
										<td>
										</td>
										<td>
											<a class="getmodal" data-id="{$vo.arc_id}" href="{:url('index/Col/onRead')}">
											{switch name="vo['arc_type']" }
												{case value="docx"}<i class="fa fa-file-word-o" style="color: #5C6BC0;font-size: 1.33333333em;line-height: .75em"></i>{/case}
												{case value="xlsx"}<i class="fa fa-file-excel-o" style="color: #43A047;font-size: 1.33333333em;line-height: .75em"></i>{/case}
												{case value="txt"}<i class="fa fa-file-text-o" style="color: #BDBDBD;font-size: 1.33333333em;line-height: .75em"></i>{/case}
												{case value="pptx"}<i class="fa fa-file-powerpoint-o" style="color: #FF6E40;font-size: 1.33333333em;line-height: .75em"></i>{/case}
												{case value="html"}<i class="fa fa-file-code-o" style="color: #BDBDBD;font-size: 1.33333333em;line-height: .75em"></i>{/case}
												{case value="doc"}<i class="fa fa-file-word-o" style="color: #5C6BC0;font-size: 1.33333333em;line-height: .75em"></i>{/case}
												{case value="xls"}<i class="fa fa-file-excel-o" style="color: #43A047;font-size: 1.33333333em;line-height: .75em"></i>{/case}
												{default /}<i class="fa fa-file-code-o" style="color: #BDBDBD;font-size: 1.33333333em;line-height: .75em"></i>
												{/switch}
												{$vo.arc_name}.{$vo.arc_type}&nbsp;&nbsp;
													{switch name="vo['audit_status']" }
													{case value="0"}<span class="label label-sm label-info">初始</span>{/case}
													{case value="1"}<span class="label label-sm label-primary " >待归档</span>{/case}
													{case value="2"}<span  class="label label-sm label-success " >已归档</span>{/case}
													{case value="3"}<span class="label label-sm label-danger "  >已打回</span>{/case}
													{/switch}
												</a>
										</td>
										<td>
											{:count_size($vo['arc_file_size'])}
										</td>
										<td>
											{$vo.update_time}
										</td>
										<td>
											<a href="#" class="btn-xs btn-success shouc_btn" style="text-decoration: none;" data-id="{$vo.arc_id}">取消收藏</a>
										</td>
									</tr>
									{/foreach}
									{/if}
									</tbody>
								</table>
							</div>
						</div>
					
					<!-- END SAMPLE TABLE PORTLET-->
				</div>
			</div>
		
			
			<!-- END PAGE CONTENT-->
		</div>
	</div>
	<!-- END CONTENT -->
</div>
<link href="/static/assets/css/toastr.min.css" rel="stylesheet"/>
<script src="/static/assets/js/toastr.min.js" rel="stylesheet"/></script>
<script>
		$(function(){
			$('.collect').addClass("active");
		});
</script>
<script>
	$(function(){
	$('.shouc_btn').click(function(){
		p = $(this).attr("data-id");
		// console.log(p);
      	postdata();
});

     function postdata(){     
         //提交数据函数   
        toastr.options = {  
            closeButton: true,  
            debug: false,  
            progressBar: true,  
            positionClass: "toast-top-right",  
            onclick: null,  
            showDuration: "1000",  
            hideDuration: "1000",  
            timeOut: "1000",  
            extendedTimeOut: "1000",  
            showEasing: "swing",  
            hideEasing: "linear",  
            showMethod: "fadeIn",  
            hideMethod: "fadeOut"  
        };
        $.ajax({                                                  //调用jquery的ajax方法   
          type: "POST",                                      //设置ajax方法提交数据的形式   
          url: '/index/Collect/cancel',                                        
          data: {
                  id : p
              }, 
          success: function(data){       
          if (data) {
            toastr.success('取消收藏成功');
            setInterval(function(){
              location.reload(true);
            }, 1000);
          }else{
            toastr.error('取消收藏失败，请重试');
          }
        },
        error: function () {
                alert('请选择要取消收藏的消息');
            }
        });   
     }   
    })
</script>
<script src="/static/assets/scripts/core/dt.js"></script>
<script>
    dt().getModals();
    dt().getUrl();
   
</script>
<!-- END CONTAINER -->
<!-- BEGIN FOOTER -->
<div class="footer">
	<div class="footer-inner">
		 2018 &copy; 仁聚科技
	</div>
	<div class="footer-tools">
		<span class="go-top">
			<i class="fa fa-angle-up"></i>
		</span>
	</div>
</div>
{/block}